<form id="upload" action="upload" method="POST"
	enctype="multipart/form-data">
	<input type="file" id="obrazek" name="plik" /> <input type="submit" />
</form>
<script type="text/javascript">
	$(document).ready(function() {
		var options = {
			dataType:  'text',
			success : showResponse
		};
		$('#upload').ajaxForm(options);
	});


	// post-submit callback 
	function showResponse(responseText, statusText, xhr, $form) {
		$('#sciezkaObrazu').attr('value', responseText);
		alert(responseText + (" wczytano poprawnie"));
	}
</script>
